package cn.hl.hm.service.impl;

import cn.hl.hm.dao.DriverVehicleMapper;
import cn.hl.hm.entity.DriverVehicle;
import cn.hl.hm.service.DriverVehicleService;
import cn.hl.hm.util.paging.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @description:
 * @Author: xianghan
 * @Date: 2017/10/25 19:17
 **/
@Service
public class DriverVehicleServiceImpl implements DriverVehicleService{
    @Autowired
    private DriverVehicleMapper driverVehicleDao;
    @Override
    public int deleteByPrimaryKey(Integer id) {
        return driverVehicleDao.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(DriverVehicle record) {
        return driverVehicleDao.insert(record);
    }

    @Override
    public int insertSelective(DriverVehicle record) {
        return driverVehicleDao.insertSelective(record);
    }

    @Override
    public DriverVehicle selectByPrimaryKey(Integer id) {
        return driverVehicleDao.selectByPrimaryKey(id);
    }

    @Override
    public List<DriverVehicle> selectByDIVI(Integer driverId, Integer vehicleId) {
        return driverVehicleDao.selectByDIVI(driverId, vehicleId);
    }

    @Override
    public int updateByPrimaryKeySelective(DriverVehicle record) {
        return driverVehicleDao.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(DriverVehicle record) {
        return driverVehicleDao.updateByPrimaryKey(record);
    }

    @Override
    public List<DriverVehicle> selectByIdAndNumberAndState(Integer driverId, String plateNumber, String
            status) {
        return driverVehicleDao.selectByIdAndNumberAndState(driverId, plateNumber, status);
    }

    @Override
    public List<DriverVehicle> selectListByDriversAndStatus(List<Integer> driverIds, List<Integer>
            statusList) {
        return driverVehicleDao.selectListByDriversAndStatus(driverIds, statusList);
    }

    @Override
    public List<Integer> selectDriverListPage(PageInfo pageInfo) {
        return driverVehicleDao.selectDriverListPage(pageInfo);
    }

    @Override
    public List<Integer> selectExistCheckPendingListPage(PageInfo pageInfo) {
        return driverVehicleDao.selectExistCheckPendingListPage(pageInfo);
    }

    @Override
	public List<DriverVehicle> selectByDriverId(Integer id) {
		return driverVehicleDao.selectByDriverId(id);
	}
    
    

}
